package com.sky.common.track;

import com.sky.business.sys.event.CmccBeginTrackingEvent;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 追踪任务统计信息
 *
 */
@Data
public class TrackTaskInfo {
    /**
     * 任务id
     */
    private String taskId;

    /**
     * 第一次收到追踪任务的时间
     */
    private Date firstReceiveTaskTime;

    /**
     * 最后一次收到追踪任务的时间
     */
    private Date lastReceiveTaskTime;


    /**
     * 最近一次的追踪任务
     */
    private CmccBeginTrackingEvent lastBeginTrackEvent;

    /**
     * 设备最后一次追踪到无人机的时间
     */
    private Map<String,Date> deviceLastReceiveMap = new HashMap<>();


    /**
     * 构造器
     * @param taskId 任务id
     * @param firstReceiveTaskTime 初次接收任务时间
     * @param beginTrackEvent  最近一次的跟踪任务
     */
    public TrackTaskInfo(String taskId,Date firstReceiveTaskTime, CmccBeginTrackingEvent beginTrackEvent){
        this.taskId = taskId;
        this.firstReceiveTaskTime = firstReceiveTaskTime;
        this.lastReceiveTaskTime = firstReceiveTaskTime;
        this.lastBeginTrackEvent = beginTrackEvent;
    }
}
